<template>
  <div>
    <h3 class="deal-title">{{ props.title }}</h3>

    <TagIcon title="导引头战技使用描述项" v-if="props.title === '数据处理前'" />
    <TagIcon title="导引头初始部署信息项" :style="styleObject" v-else />
    <el-descriptions :column="1" size="large">
      <el-descriptions-item label="工作状态">{{
        sourceObject.dytTacticInfoVO?.workStatus
      }}</el-descriptions-item>
      <el-descriptions-item label="工作策略">
        {{ sourceObject.dytTacticInfoVO?.workStrategy }}
      </el-descriptions-item>
      <el-descriptions-item label="姿态信息">
        {{ sourceObject.dytTacticInfoVO?.attitudeInfo }}
      </el-descriptions-item>
      <el-descriptions-item label="其他">
        {{ sourceObject.dytTacticInfoVO?.elseInfo }}
      </el-descriptions-item>
    </el-descriptions>

    <TagIcon title="导引头战技使用描述项" v-if="props.title === '数据处理前'" />
    <TagIcon title="导引头初始部署信息项" :style="styleObject" v-else />
    <el-descriptions :column="1" size="large">
      <el-descriptions-item label="运动状态">{{
        sourceObject.targetTacticInfoVO?.moveStatus
      }}</el-descriptions-item>
      <el-descriptions-item label="船体RCS">
        {{ sourceObject.targetTacticInfoVO?.hullRcs }}
      </el-descriptions-item>
      <el-descriptions-item label="运动方向">
        {{ sourceObject.targetTacticInfoVO?.moveDirection }}
      </el-descriptions-item>
      <el-descriptions-item label="船体姿态">
        {{ sourceObject.targetTacticInfoVO?.hullAttitude }}
      </el-descriptions-item>
      <el-descriptions-item label="运动速度">
        {{ sourceObject.targetTacticInfoVO?.moveSpeed }}
      </el-descriptions-item>
    </el-descriptions>

    <!-- <TagIcon title="背景环境过程描述项" v-if="props.title === '数据处理前'" />
    <TagIcon title="导引头初始部署信息项" :style="styleObject" v-else />
    <el-descriptions :column="1" size="large">
      <el-descriptions-item label="海况等级">{{
        props.battleEnviInitialInfoVO.waveLevel
      }}</el-descriptions-item>
      <el-descriptions-item label="其他">
        {{ props.battleEnviInitialInfoVO.elseInfo }}
      </el-descriptions-item>
      <el-descriptions-item label="风速">
        {{ props.battleEnviInitialInfoVO.windSpeed }}
      </el-descriptions-item>
      <el-descriptions-item label="风向">
        {{ props.battleEnviInitialInfoVO.windDirection }}
      </el-descriptions-item>
    </el-descriptions> -->

    <div v-if="props.interferType === '舰载有源干扰-雷达'">
      <TagIcon
        title="干扰装备战技使用描述项(舰载有源干扰装备)"
        v-if="props.title === '数据处理前'"
      />
      <TagIcon title="导引头初始部署信息项" :style="styleObject" v-else />
      <el-descriptions :column="1" size="large">
        <el-descriptions-item label="开关状态">{{
          sourceObject.shipborneUseVO?.switchStatus
        }}</el-descriptions-item>
        <el-descriptions-item label="辐射功率">
          {{ sourceObject.shipborneUseVO?.equivalentRadiatedPower }}
        </el-descriptions-item>
        <el-descriptions-item label="侦收时间窗">
          {{ sourceObject.shipborneUseVO?.sweepingPeriod }}
        </el-descriptions-item>
        <el-descriptions-item label="干扰样式参数设置描述项">
          {{ sourceObject.shipborneUseVO?.jammingStyle }}
        </el-descriptions-item>
        <el-descriptions-item label="工作模式">
          {{ sourceObject.shipborneUseVO?.workingMode }}
        </el-descriptions-item>
        <el-descriptions-item label="中心频率">
          {{ sourceObject.shipborneUseVO?.centerFrequency }}
        </el-descriptions-item>
        <el-descriptions-item label="干扰时间窗">
          {{ sourceObject.shipborneUseVO?.jammingPeriod }}
        </el-descriptions-item>
        <el-descriptions-item label="其他">
          {{ sourceObject.shipborneUseVO?.elseInfo }}
        </el-descriptions-item>
        <el-descriptions-item label="干扰方向">
          {{ sourceObject.shipborneUseVO?.interDirection }}
        </el-descriptions-item>
        <el-descriptions-item label="收发方式">
          {{ sourceObject.shipborneUseVO?.transmitReceiveMethod }}
        </el-descriptions-item>
        <el-descriptions-item label="干扰样式">
          {{ sourceObject.shipborneUseVO?.jammingMode }}
        </el-descriptions-item>
      </el-descriptions>
    </div>

    <div v-if="props.interferType === '舷外有源干扰-雷达'">
      <TagIcon
        title="干扰装备战技使用描述项(舷外有源干扰)"
        v-if="props.title === '数据处理前'"
      />
      <TagIcon title="导引头初始部署信息项" :style="styleObject" v-else />
      <el-descriptions :column="1" size="large">
        <el-descriptions-item label="发射器位置">{{
          sourceObject.outboardUseVO?.launcherLocation
        }}</el-descriptions-item>
        <el-descriptions-item label="干扰方向">
          {{ sourceObject.outboardUseVO?.interDirection }}
        </el-descriptions-item>
        <el-descriptions-item label="收发方式">
          {{ sourceObject.outboardUseVO?.transmitReceiveMethod }}
        </el-descriptions-item>
        <el-descriptions-item label="干扰样式参数设置描述项">
          {{ sourceObject.outboardUseVO?.jammingStyle }}
        </el-descriptions-item>
        <el-descriptions-item label="开关状态">
          {{ sourceObject.outboardUseVO?.switchStatus }}
        </el-descriptions-item>
        <el-descriptions-item label="辐射功率">
          {{ sourceObject.outboardUseVO?.equivalentRadiatedPower }}
        </el-descriptions-item>
        <el-descriptions-item label="侦收时间窗">
          {{ sourceObject.outboardUseVO?.sweepingPeriod }}
        </el-descriptions-item>
        <el-descriptions-item label="工作模式">
          {{ sourceObject.outboardUseVO?.workingMode }}
        </el-descriptions-item>
        <el-descriptions-item label="其他">
          {{ sourceObject.outboardUseVO?.elseInfo }}
        </el-descriptions-item>
        <el-descriptions-item label="中心频率">
          {{ sourceObject.outboardUseVO?.centerFrequency }}
        </el-descriptions-item>
        <el-descriptions-item label="干扰时间窗">
          {{ sourceObject.outboardUseVO?.jammingPeriod }}
        </el-descriptions-item>
      </el-descriptions>
    </div>

    <div v-if="props.interferType === '箔条干扰-雷达'">
      <TagIcon
        title="干扰装备战技使用描述项(箔条干扰)"
        v-if="props.title === '数据处理前'"
      />
      <TagIcon title="导引头初始部署信息项" :style="styleObject" v-else />
      <el-descriptions :column="1" size="large">
        <el-descriptions-item label="发射数量">{{
          sourceObject.chaffJammingUseVO?.launchCount
        }}</el-descriptions-item>
        <el-descriptions-item label="箔条弹型号">
          {{ sourceObject.chaffJammingUseVO?.chaffModel }}
        </el-descriptions-item>
        <el-descriptions-item label="其他">
          {{ sourceObject.chaffJammingUseVO?.elseInfo }}
        </el-descriptions-item>
        <el-descriptions-item label="发射器位置">
          {{ sourceObject.chaffJammingUseVO?.launcherLocation }}
        </el-descriptions-item>
        <el-descriptions-item label="每枚弹的发射距离">
          {{ sourceObject.chaffJammingUseVO?.launchDistance }}
        </el-descriptions-item>
        <el-descriptions-item label="发射状态">
          {{ sourceObject.chaffJammingUseVO?.launchStatus }}
        </el-descriptions-item>
        <el-descriptions-item label="每枚弹的发射方向与角度">
          {{ sourceObject.chaffJammingUseVO?.launchDirectionAngle }}
        </el-descriptions-item>
      </el-descriptions>
    </div>

    <div v-if="props.interferType === '角反干扰-雷达'">
      <TagIcon
        title="干扰装备战技使用描述项(角反干扰)"
        v-if="props.title === '数据处理前'"
      />
      <TagIcon title="导引头初始部署信息项" :style="styleObject" v-else />
      <el-descriptions :column="1" size="large">
        <el-descriptions-item label="战术使用方式简述">{{
          sourceObject.cornerReflectorUseVO?.tacticUseDes
        }}</el-descriptions-item>
        <el-descriptions-item label="布设状态">
          {{ sourceObject.cornerReflectorUseVO?.deployStatus }}
        </el-descriptions-item>
        <el-descriptions-item label="布设器位置">
          {{ sourceObject.cornerReflectorUseVO?.deployerLocation }}
        </el-descriptions-item>
        <el-descriptions-item label="其他">
          {{ sourceObject.cornerReflectorUseVO?.elseInfo }}
        </el-descriptions-item>
        <el-descriptions-item label="布设数量">
          {{ sourceObject.cornerReflectorUseVO?.deployCount }}
        </el-descriptions-item>
        <el-descriptions-item label="布设距离">
          {{ sourceObject.cornerReflectorUseVO?.deployDistance }}
        </el-descriptions-item>
        <el-descriptions-item label="布设形式">
          {{ sourceObject.cornerReflectorUseVO?.deployStyle }}
        </el-descriptions-item>
        <el-descriptions-item label="布设角度">
          {{ sourceObject.cornerReflectorUseVO?.deployAngle }}
        </el-descriptions-item>
      </el-descriptions>
    </div>
  </div>
</template>

<script lang="ts" setup>
import TagIcon from '@/components/tag-icon/index.vue';
import { reactive, watch, ref } from 'vue';
const styleObject = reactive({visibility: 'hidden'})
const props = defineProps({
  title: { type: String, default: '数据处理前' },
  interferType: { type: String, default: '舰载有源干扰-雷达' },
  dealDataSources: {
    type: Object,
    default: () => {
      return {};
    },
  },
});

const sourceObject = ref<any>({})

watch(
  () => props.dealDataSources,
  (newValue, oldValue) => {
    sourceObject.value = newValue?.dynamicPara[0];
  }
);

</script>

<style lang="scss" scoped>
.deal-title {
  font-size: 16px;
  color: #303133;
  margin-bottom: 20px;
}
:deep() {
  .el-descriptions__label {
    width: 120px;
    display: inline-block;
    text-align: right;
  }
  .el-descriptions__content {
    color: #000;
  }
}
</style>
